<?php

/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */

/**
 * Short description for file
 *
 * PHP version 5.3.+
 *
 * @category   
 * @package    
 * @author     Marius Schmidt <marius.schmidt@gridground.de>
 * @copyright  2010-2012 Gridground UG (haftungsbeschränkt)
 * @license    http://www.gridground.de/license/brickscout.txt
 * @version    GIT: $Id$
 * @link       
 * @see        
 * @since      File available since 
 */

/**
 * Short description for class
 *
 * @category   
 * @package    
 * @author     Marius Schmidt <marius.schmidt@gridground.de>
 * @copyright  2010-2012 Gridground UG (haftungsbeschränkt)
 * @license    http://www.gridground.de/license/brickscout.txt
 * @version    Release: @package_version@
 * @link       
 * @see        
 * @since      Class available since Release 
 */
class Economic_RemoteCommandMediatorImpl implements Economic_RemoteCommandMediator {

    private $_webService;

    public function getWebService() {
        return $this->_webService;
    }

    public function setWebService(Economic_WebService $webService) {
        $this->_webService = $webService;
    }

    public function soapCall($functionName, $params) {
        $service = $this->getWebService();
        $result = $service->soapCall($functionName, $params);
        return $result;
    }

    public function getData(Economic_Entity $entity) {
        return $this->execute('Economic_GetDataCommand', $entity);
    }

    public function execute($commandClass, $parameter) {
        $command = new $commandClass($this, $parameter);
        return $command->execute();
    }
    
//    public function create() {}
//    public function createFromData() {}
//    public function createFromDataArray() {}
//    public function findBy() {}
//    public function getAll() {}
//    public function getAllUpdated() {}
//    public function updateFromData() {}
//    public function updateFromArray() {}
//    public function delete() {}
}
